import base64
from Crypto.Cipher import AES

# 期待的字符串
# {'cip':'0.0.0.0','cid':'370000','cname':'山东省'}

# 加密后的字符串
str_ = "4PqRuzbTDFhung2uTTd5T3l1MLA/o9/aMGwELkSZLPGNsS2W3k90un+ULLY+EtAZEm24g5oF9Imxh3q1IHfHLw=="
# 加密秘钥
key = str("uPikRHLh1dnl7JlW")
# 解密
aes = AES.new(key=key.encode('utf-8'), mode=AES.MODE_ECB)
res = base64.decodebytes(str_.encode("utf8"))
msg = aes.decrypt(res).decode("utf8")
value = eval(msg.strip().strip(b'\x00'.decode("utf8")).strip(b'\x07'.decode("utf8")))
print(value)
